<nz-card style="width: 100%" nzTitle="请求">
  <div style="display: flex">
    <div style="width: 100px; padding-right: 10px">
      <nz-select [(ngModel)]="method" style="width: 100%">
        <nz-option nzValue="GET" nzLabel="GET"></nz-option>
        <nz-option nzValue="POST" nzLabel="POST"></nz-option>
      </nz-select>
    </div>
    <div style="flex: 1">
      <input nz-input placeholder="请输入URL" [(ngModel)]="url" />
    </div>
    <div style="width: 100px; padding-left: 10px">
      <button nz-button nzType="primary" (click)="send()">发送请求</button>
    </div>
  </div>

  <nz-tabset [nzTabPosition]="'top'" [nzType]="'card'" style="margin-top: 10px">
    <nz-tab *ngFor="let tab of tabs" [nzTitle]="tab">
      <textarea rows="4" nz-input [(ngModel)]="request[tab]"></textarea>
    </nz-tab>
  </nz-tabset>

  <nz-divider nzText="返回结果"></nz-divider>
  <nz-spin [nzSpinning]="resultLoading">
    <div style="margin: 10px">
      <div *ngIf="response; then thenBlock; else elseBlock"></div>
      <ng-template #thenBlock>
        {{ response }}
      </ng-template>
      <ng-template #elseBlock> 暂无结果 </ng-template>
    </div>
  </nz-spin>
</nz-card>
